﻿
namespace Komunikator.Web
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Data;
    using System.Linq;
    using System.ServiceModel.DomainServices.EntityFramework;
    using System.ServiceModel.DomainServices.Hosting;
    using System.ServiceModel.DomainServices.Server;


    // Implements application logic using the CommunicatorEntities context.
    // TODO: Add your application logic to these methods or in additional methods.
    // TODO: Wire up authentication (Windows/ASP.NET Forms) and uncomment the following to disable anonymous access
    // Also consider adding roles to restrict access as appropriate.
    // [RequiresAuthentication]
    [EnableClientAccess()]
    public partial class CommunicatorDomainService : LinqToEntitiesDomainService<CommunicatorEntities>
    {

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Applications' query.
        public IQueryable<aspnet_Applications> GetAspnet_Applications()
        {
            return this.ObjectContext.aspnet_Applications;
        }

        public void InsertAspnet_Applications(aspnet_Applications aspnet_Applications)
        {
            if ((aspnet_Applications.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Applications, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Applications.AddObject(aspnet_Applications);
            }
        }

        public void UpdateAspnet_Applications(aspnet_Applications currentaspnet_Applications)
        {
            this.ObjectContext.aspnet_Applications.AttachAsModified(currentaspnet_Applications, this.ChangeSet.GetOriginal(currentaspnet_Applications));
        }

        public void DeleteAspnet_Applications(aspnet_Applications aspnet_Applications)
        {
            if ((aspnet_Applications.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Applications.Attach(aspnet_Applications);
            }
            this.ObjectContext.aspnet_Applications.DeleteObject(aspnet_Applications);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Membership' query.
        public IQueryable<aspnet_Membership> GetAspnet_Membership()
        {
            return this.ObjectContext.aspnet_Membership;
        }

        public void InsertAspnet_Membership(aspnet_Membership aspnet_Membership)
        {
            if ((aspnet_Membership.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Membership, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Membership.AddObject(aspnet_Membership);
            }
        }

        public void UpdateAspnet_Membership(aspnet_Membership currentaspnet_Membership)
        {
            this.ObjectContext.aspnet_Membership.AttachAsModified(currentaspnet_Membership, this.ChangeSet.GetOriginal(currentaspnet_Membership));
        }

        public void DeleteAspnet_Membership(aspnet_Membership aspnet_Membership)
        {
            if ((aspnet_Membership.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Membership.Attach(aspnet_Membership);
            }
            this.ObjectContext.aspnet_Membership.DeleteObject(aspnet_Membership);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Paths' query.
        public IQueryable<aspnet_Paths> GetAspnet_Paths()
        {
            return this.ObjectContext.aspnet_Paths;
        }

        public void InsertAspnet_Paths(aspnet_Paths aspnet_Paths)
        {
            if ((aspnet_Paths.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Paths, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Paths.AddObject(aspnet_Paths);
            }
        }

        public void UpdateAspnet_Paths(aspnet_Paths currentaspnet_Paths)
        {
            this.ObjectContext.aspnet_Paths.AttachAsModified(currentaspnet_Paths, this.ChangeSet.GetOriginal(currentaspnet_Paths));
        }

        public void DeleteAspnet_Paths(aspnet_Paths aspnet_Paths)
        {
            if ((aspnet_Paths.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Paths.Attach(aspnet_Paths);
            }
            this.ObjectContext.aspnet_Paths.DeleteObject(aspnet_Paths);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_PersonalizationAllUsers' query.
        public IQueryable<aspnet_PersonalizationAllUsers> GetAspnet_PersonalizationAllUsers()
        {
            return this.ObjectContext.aspnet_PersonalizationAllUsers;
        }

        public void InsertAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers aspnet_PersonalizationAllUsers)
        {
            if ((aspnet_PersonalizationAllUsers.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_PersonalizationAllUsers, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_PersonalizationAllUsers.AddObject(aspnet_PersonalizationAllUsers);
            }
        }

        public void UpdateAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers currentaspnet_PersonalizationAllUsers)
        {
            this.ObjectContext.aspnet_PersonalizationAllUsers.AttachAsModified(currentaspnet_PersonalizationAllUsers, this.ChangeSet.GetOriginal(currentaspnet_PersonalizationAllUsers));
        }

        public void DeleteAspnet_PersonalizationAllUsers(aspnet_PersonalizationAllUsers aspnet_PersonalizationAllUsers)
        {
            if ((aspnet_PersonalizationAllUsers.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_PersonalizationAllUsers.Attach(aspnet_PersonalizationAllUsers);
            }
            this.ObjectContext.aspnet_PersonalizationAllUsers.DeleteObject(aspnet_PersonalizationAllUsers);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_PersonalizationPerUser' query.
        public IQueryable<aspnet_PersonalizationPerUser> GetAspnet_PersonalizationPerUser()
        {
            return this.ObjectContext.aspnet_PersonalizationPerUser;
        }

        public void InsertAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser aspnet_PersonalizationPerUser)
        {
            if ((aspnet_PersonalizationPerUser.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_PersonalizationPerUser, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_PersonalizationPerUser.AddObject(aspnet_PersonalizationPerUser);
            }
        }

        public void UpdateAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser currentaspnet_PersonalizationPerUser)
        {
            this.ObjectContext.aspnet_PersonalizationPerUser.AttachAsModified(currentaspnet_PersonalizationPerUser, this.ChangeSet.GetOriginal(currentaspnet_PersonalizationPerUser));
        }

        public void DeleteAspnet_PersonalizationPerUser(aspnet_PersonalizationPerUser aspnet_PersonalizationPerUser)
        {
            if ((aspnet_PersonalizationPerUser.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_PersonalizationPerUser.Attach(aspnet_PersonalizationPerUser);
            }
            this.ObjectContext.aspnet_PersonalizationPerUser.DeleteObject(aspnet_PersonalizationPerUser);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Profile' query.
        public IQueryable<aspnet_Profile> GetAspnet_Profile()
        {
            return this.ObjectContext.aspnet_Profile;
        }

        public void InsertAspnet_Profile(aspnet_Profile aspnet_Profile)
        {
            if ((aspnet_Profile.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Profile, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Profile.AddObject(aspnet_Profile);
            }
        }

        public void UpdateAspnet_Profile(aspnet_Profile currentaspnet_Profile)
        {
            this.ObjectContext.aspnet_Profile.AttachAsModified(currentaspnet_Profile, this.ChangeSet.GetOriginal(currentaspnet_Profile));
        }

        public void DeleteAspnet_Profile(aspnet_Profile aspnet_Profile)
        {
            if ((aspnet_Profile.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Profile.Attach(aspnet_Profile);
            }
            this.ObjectContext.aspnet_Profile.DeleteObject(aspnet_Profile);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Roles' query.
        public IQueryable<aspnet_Roles> GetAspnet_Roles()
        {
            return this.ObjectContext.aspnet_Roles;
        }

        public void InsertAspnet_Roles(aspnet_Roles aspnet_Roles)
        {
            if ((aspnet_Roles.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Roles, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Roles.AddObject(aspnet_Roles);
            }
        }

        public void UpdateAspnet_Roles(aspnet_Roles currentaspnet_Roles)
        {
            this.ObjectContext.aspnet_Roles.AttachAsModified(currentaspnet_Roles, this.ChangeSet.GetOriginal(currentaspnet_Roles));
        }

        public void DeleteAspnet_Roles(aspnet_Roles aspnet_Roles)
        {
            if ((aspnet_Roles.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Roles.Attach(aspnet_Roles);
            }
            this.ObjectContext.aspnet_Roles.DeleteObject(aspnet_Roles);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_SchemaVersions' query.
        public IQueryable<aspnet_SchemaVersions> GetAspnet_SchemaVersions()
        {
            return this.ObjectContext.aspnet_SchemaVersions;
        }

        public void InsertAspnet_SchemaVersions(aspnet_SchemaVersions aspnet_SchemaVersions)
        {
            if ((aspnet_SchemaVersions.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_SchemaVersions, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_SchemaVersions.AddObject(aspnet_SchemaVersions);
            }
        }

        public void UpdateAspnet_SchemaVersions(aspnet_SchemaVersions currentaspnet_SchemaVersions)
        {
            this.ObjectContext.aspnet_SchemaVersions.AttachAsModified(currentaspnet_SchemaVersions, this.ChangeSet.GetOriginal(currentaspnet_SchemaVersions));
        }

        public void DeleteAspnet_SchemaVersions(aspnet_SchemaVersions aspnet_SchemaVersions)
        {
            if ((aspnet_SchemaVersions.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_SchemaVersions.Attach(aspnet_SchemaVersions);
            }
            this.ObjectContext.aspnet_SchemaVersions.DeleteObject(aspnet_SchemaVersions);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_Users' query.
        public IQueryable<aspnet_Users> GetAspnet_Users()
        {
            return this.ObjectContext.aspnet_Users;
        }

        public void InsertAspnet_Users(aspnet_Users aspnet_Users)
        {
            if ((aspnet_Users.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_Users, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_Users.AddObject(aspnet_Users);
            }
        }

        public void UpdateAspnet_Users(aspnet_Users currentaspnet_Users)
        {
            this.ObjectContext.aspnet_Users.AttachAsModified(currentaspnet_Users, this.ChangeSet.GetOriginal(currentaspnet_Users));
        }

        public void DeleteAspnet_Users(aspnet_Users aspnet_Users)
        {
            if ((aspnet_Users.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_Users.Attach(aspnet_Users);
            }
            this.ObjectContext.aspnet_Users.DeleteObject(aspnet_Users);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'aspnet_WebEvent_Events' query.
        public IQueryable<aspnet_WebEvent_Events> GetAspnet_WebEvent_Events()
        {
            return this.ObjectContext.aspnet_WebEvent_Events;
        }

        public void InsertAspnet_WebEvent_Events(aspnet_WebEvent_Events aspnet_WebEvent_Events)
        {
            if ((aspnet_WebEvent_Events.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(aspnet_WebEvent_Events, EntityState.Added);
            }
            else
            {
                this.ObjectContext.aspnet_WebEvent_Events.AddObject(aspnet_WebEvent_Events);
            }
        }

        public void UpdateAspnet_WebEvent_Events(aspnet_WebEvent_Events currentaspnet_WebEvent_Events)
        {
            this.ObjectContext.aspnet_WebEvent_Events.AttachAsModified(currentaspnet_WebEvent_Events, this.ChangeSet.GetOriginal(currentaspnet_WebEvent_Events));
        }

        public void DeleteAspnet_WebEvent_Events(aspnet_WebEvent_Events aspnet_WebEvent_Events)
        {
            if ((aspnet_WebEvent_Events.EntityState == EntityState.Detached))
            {
                this.ObjectContext.aspnet_WebEvent_Events.Attach(aspnet_WebEvent_Events);
            }
            this.ObjectContext.aspnet_WebEvent_Events.DeleteObject(aspnet_WebEvent_Events);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Cities' query.
        public IQueryable<Cities> GetCities()
        {
            return this.ObjectContext.Cities;
        }

        public void InsertCities(Cities cities)
        {
            if ((cities.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(cities, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Cities.AddObject(cities);
            }
        }

        public void UpdateCities(Cities currentCities)
        {
            this.ObjectContext.Cities.AttachAsModified(currentCities, this.ChangeSet.GetOriginal(currentCities));
        }

        public void DeleteCities(Cities cities)
        {
            if ((cities.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Cities.Attach(cities);
            }
            this.ObjectContext.Cities.DeleteObject(cities);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'ContactLists' query.
        public IQueryable<ContactLists> GetContactLists()
        {
            return this.ObjectContext.ContactLists;
        }

        public void InsertContactLists(ContactLists contactLists)
        {
            if ((contactLists.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(contactLists, EntityState.Added);
            }
            else
            {
                this.ObjectContext.ContactLists.AddObject(contactLists);
            }
        }

        public void UpdateContactLists(ContactLists currentContactLists)
        {
            this.ObjectContext.ContactLists.AttachAsModified(currentContactLists, this.ChangeSet.GetOriginal(currentContactLists));
        }

        public void DeleteContactLists(ContactLists contactLists)
        {
            if ((contactLists.EntityState == EntityState.Detached))
            {
                this.ObjectContext.ContactLists.Attach(contactLists);
            }
            this.ObjectContext.ContactLists.DeleteObject(contactLists);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Contacts' query.
        public IQueryable<Contacts> GetContacts()
        {
            return this.ObjectContext.Contacts;
        }

        public void InsertContacts(Contacts contacts)
        {
            if ((contacts.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(contacts, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Contacts.AddObject(contacts);
            }
        }

        public void UpdateContacts(Contacts currentContacts)
        {
            this.ObjectContext.Contacts.AttachAsModified(currentContacts, this.ChangeSet.GetOriginal(currentContacts));
        }

        public void DeleteContacts(Contacts contacts)
        {
            if ((contacts.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Contacts.Attach(contacts);
            }
            this.ObjectContext.Contacts.DeleteObject(contacts);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Conversations' query.
        public IQueryable<Conversations> GetConversations()
        {
            return this.ObjectContext.Conversations;
        }

        public void InsertConversations(Conversations conversations)
        {
            if ((conversations.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(conversations, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Conversations.AddObject(conversations);
            }
        }

        public void UpdateConversations(Conversations currentConversations)
        {
            this.ObjectContext.Conversations.AttachAsModified(currentConversations, this.ChangeSet.GetOriginal(currentConversations));
        }

        public void DeleteConversations(Conversations conversations)
        {
            if ((conversations.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Conversations.Attach(conversations);
            }
            this.ObjectContext.Conversations.DeleteObject(conversations);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Countries' query.
        public IQueryable<Countries> GetCountries()
        {
            return this.ObjectContext.Countries;
        }

        public void InsertCountries(Countries countries)
        {
            if ((countries.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(countries, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Countries.AddObject(countries);
            }
        }

        public void UpdateCountries(Countries currentCountries)
        {
            this.ObjectContext.Countries.AttachAsModified(currentCountries, this.ChangeSet.GetOriginal(currentCountries));
        }

        public void DeleteCountries(Countries countries)
        {
            if ((countries.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Countries.Attach(countries);
            }
            this.ObjectContext.Countries.DeleteObject(countries);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'Messages' query.
        public IQueryable<Messages> GetMessages()
        {
            return this.ObjectContext.Messages;
        }

        public void InsertMessages(Messages messages)
        {
            if ((messages.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(messages, EntityState.Added);
            }
            else
            {
                this.ObjectContext.Messages.AddObject(messages);
            }
        }

        public void UpdateMessages(Messages currentMessages)
        {
            this.ObjectContext.Messages.AttachAsModified(currentMessages, this.ChangeSet.GetOriginal(currentMessages));
        }

        public void DeleteMessages(Messages messages)
        {
            if ((messages.EntityState == EntityState.Detached))
            {
                this.ObjectContext.Messages.Attach(messages);
            }
            this.ObjectContext.Messages.DeleteObject(messages);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'User_Personal_Data' query.
        public IQueryable<User_Personal_Data> GetUser_Personal_Data()
        {
            return this.ObjectContext.User_Personal_Data;
        }

        public void InsertUser_Personal_Data(User_Personal_Data user_Personal_Data)
        {
            if ((user_Personal_Data.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(user_Personal_Data, EntityState.Added);
            }
            else
            {
                this.ObjectContext.User_Personal_Data.AddObject(user_Personal_Data);
            }
        }

        public void UpdateUser_Personal_Data(User_Personal_Data currentUser_Personal_Data)
        {
            this.ObjectContext.User_Personal_Data.AttachAsModified(currentUser_Personal_Data, this.ChangeSet.GetOriginal(currentUser_Personal_Data));
        }

        public void DeleteUser_Personal_Data(User_Personal_Data user_Personal_Data)
        {
            if ((user_Personal_Data.EntityState == EntityState.Detached))
            {
                this.ObjectContext.User_Personal_Data.Attach(user_Personal_Data);
            }
            this.ObjectContext.User_Personal_Data.DeleteObject(user_Personal_Data);
        }

        // TODO:
        // Consider constraining the results of your query method.  If you need additional input you can
        // add parameters to this method or create additional query methods with different names.
        // To support paging you will need to add ordering to the 'User_Settings' query.
        public IQueryable<User_Settings> GetUser_Settings()
        {
            return this.ObjectContext.User_Settings;
        }

        public void InsertUser_Settings(User_Settings user_Settings)
        {
            if ((user_Settings.EntityState != EntityState.Detached))
            {
                this.ObjectContext.ObjectStateManager.ChangeObjectState(user_Settings, EntityState.Added);
            }
            else
            {
                this.ObjectContext.User_Settings.AddObject(user_Settings);
            }
        }

        public void UpdateUser_Settings(User_Settings currentUser_Settings)
        {
            this.ObjectContext.User_Settings.AttachAsModified(currentUser_Settings, this.ChangeSet.GetOriginal(currentUser_Settings));
        }

        public void DeleteUser_Settings(User_Settings user_Settings)
        {
            if ((user_Settings.EntityState == EntityState.Detached))
            {
                this.ObjectContext.User_Settings.Attach(user_Settings);
            }
            this.ObjectContext.User_Settings.DeleteObject(user_Settings);
        }
    }
}


